import Vue from 'vue'
import App from './App'
import store from './store'
import {request} from './common/http'
import {anyNull, isNull} from './common/base.js'
import {hasPermisson} from './common/permission.js'

Vue.config.productionTip = false

Vue.prototype.$store = store
Vue.prototype.$request = request
Vue.prototype.$anyNull = anyNull
Vue.prototype.$isNull = isNull
Vue.prototype.$hasPermission = hasPermisson

// 提示组件
Vue.prototype.$message = {
	info: message => uni.showToast({title: message,icon: 'none'}),
	success: message => uni.showToast({title: message,icon: 'success'}),
	error: message => uni.showToast({title: message,icon: 'error'})
}

App.mpType = 'app'

const app = new Vue({
	store,
	...App,
})

app.$mount()